package com.example.mapper;

import com.example.pojo.Device;
import lombok.Data;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface DeviceMapper {
    Long count(String deviceid, String note);

    List<Device> page(Integer start, Integer pageSize, String deviceid, String note);
@Insert("insert into device(deviceid,pro,note) values(#{deviceid},#{pro},#{note})")
    void add(Device device);
@Update("update device set price=#{price},devdate=#{devdate} where id=#{id}")
    void update(Device device);
@Delete("delete from device where id=#{id}")
    void delete(int id);
}
